package com.felix.algorithms.easy;

/**
 * ToLowerCase
 *
 * @author xuejinhua
 * @date 2018/9/13 15:52
 */
public class ToLowerCase {

    /**
     * Q709
     *
     * @return
     */
    public static String solution(String source) {
        char[] chars = source.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            if (chars[i] >= 'A' && chars[i] <= 'Z') {
                chars[i] += 32;
            }
        }
        return String.valueOf(chars);
    }

    public static void main(String[] args) {
        String source = "Hello";
        System.out.println(solution(source));
    }
}
